<?php


namespace app\admin\controller\base;


use app\BaseController;
use think\response\Json;
use app\admin\service\base\StudentGroupService;

class StudentGroup  extends BaseController
{
    /**
     * 列表
     * @return Json
     */
    public function index(StudentGroupService $groupService):Json
    {
        $params = request()->param();
        return $groupService->index($params);
    }

    /**
     * 详情
     * @param StudentGroupService $groupService
     * @return Json
     */
    public function read(StudentGroupService $groupService):Json
    {
        $params = request()->param();
        return $groupService->read($params);
    }

    /**
     * 创建班级
     * @return Json
     */
    public function save(StudentGroupService $groupService):Json
    {
        $params = request()->param();
        return $groupService->save($params);
    }

    /**
     * 更新班级信息
     * @return Json
     */
    public function update(StudentGroupService $groupService):Json
    {
        $params = request()->param();
        return $groupService->update($params);
    }


    /**
     * 删除班级信息
     * @return Json
     */
    public function delete(StudentGroupService $groupService):Json
    {
        $params = request()->param();
        return $groupService->delete($params);
    }
}